package com.lexc.watermq.broker.config;

import com.lexc.watermq.broker.cache.CommonCache;
import com.lexc.watermq.broker.constants.BrokerConstants;
import org.apache.commons.lang3.StringUtils;

/**
 * createTime：2025-08-18 11:32
 * description：全局属性加载
 */
public class GlobalPropertiesLoader {


    public void loadProperties() {
        GlobalProperties globalProperties = new GlobalProperties();
        String waterMqHome = BrokerConstants.WATER_MQ_HOME.getVal();
        if (StringUtils.isBlank(waterMqHome)) {
            throw new IllegalArgumentException("water mq home is null");
        }
        globalProperties.setWaterMQHome(waterMqHome);
        CommonCache.setGlobalProperties(globalProperties);
    }
}
